import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询用户列表
export function listUser(query) {
    return request({
        url: '/system/user/list',
        method: 'get',
        params: query
    })
}
//发起库存盘点
export function initiateInventory(data) {
    return request({
        url: '/warehouse/initiateInventory',
        method: 'post',
        data:data
    })
}
//获取所有仓库
export function getWarehouses() {
    return request({
        url: '/warehouse/getWarehouse',
        method: 'get',
    })
}
//获取盘点人
export function getOrdinaryEmployees() {
    return request({
        url: '/warehouse/getOrdinaryEmployees',
        method: 'get',
    })
}

//获取商品集合
export function selectProduct() {
    return request({
        url: '/product/selectProduct',
        method: 'post',
    })
}
//获取库存盘点
export function getAllInventory(data) {
    return request({
        url: '/warehouse/getAllInventory',
        method: 'post',
        data:data
    })
}

//获取所有库存盘点明细
export function getAllInventoryDetails(data) {
    return request({
        url: '/warehouse/getAllInventory',
        method: 'post',
        data:data
    })
}

//修改审核状态
export function updateStatus(data) {
    return request({
        url: '/warehouse/updateStatus',
        method: 'post',
        data:data
    })
}
//填写详情
export function fillInventoryDetail(data) {
    return request({
        url: '/warehouse/fillInventoryDetail',
        method: 'post',
        data:data
    })
}
//获取所有商品
export function selectAllProducts(data) {
    return request({
        url: '/product/select',
        method: 'post',
        data:data
    })
}
//获取所有商品名
export function selectProductName() {
    return request({
        url: '/product/queryProductName',
        method: 'post',
    })
}
//获取所有品牌
export function selectBrandName() {
    return request({
        url: '/product/queryBrand',
        method: 'post',
    })
}
//添加残次品处理
export function submitAllDefective(data) {
    return request({
        url: '/warehouse/defectiveApplication',
        method: 'post',
        data:data
    })
}

//查询残次品处理申请数据
export function selectDefectiveApplication(data) {
    return request({
        url: '/warehouse/selectDefectiveApplication',
        method: 'post',
        data:data
    })
}
//添加残次品处理
export function updateDefectiveStatus(data) {
    return request({
        url: '/warehouse/updateDefectiveStatus',
        method: 'post',
        data:data
    })
}
//指定员工出库
export function designatedEmployeeOut(data) {
    return request({
        url: '/warehouse/updateDefectiveStatus',
        method: 'post',
        data:data
    })
}

//生成出库单
export function generateOutbound(data) {
    return request({
        url: '/warehouse/generateOutbound',
        method: 'post',
        data:data
    })
}